#ifndef __DRV_CAN__
#define __DRV_CAN__

#include "stdint.h"

#include "FreeRTOS.h"
#include "semphr.h"
#include "queue.h"
#include "stm32mp1xx_hal.h"
#include "stm32mp1xx_hal_fdcan.h"
#include "fdcan.h"

#ifdef __cplusplus
extern "C" {
#endif

#define CAN_CHN1        1
#define CAN_CHN2        2

typedef struct
{
    int data;
} stm32_can_t;

int stm32_fdcan1_send_message(int chn, uint32_t id, uint8_t *data, int len);
int stm32_fdcan2_send_message(int chn, uint32_t id, uint8_t *data, int len);
int stm32_can_start(void);
#ifdef __cplusplus
}
#endif

#endif      /* __DRV_CAN__ */


